/* 
 * File:   IRepository.h
 * Author: johnneyshi
 *
 * Created on 2013年4月23日, 下午1:20
 */

#ifndef IREPOSITORY_H
#define	IREPOSITORY_H
#include "JRepositoryOperationResult.h"
#include "JDir.h"
#include "JFile.h"

class IRepository 
{
public:
    virtual JRepositoryOperationResult GetLock(std::string _lockType) = 0;
    virtual JRepositoryOperationResult ReleaseLock() = 0;
    
    virtual JRepositoryOperationResult Add(JFile& _file) = 0;
    virtual JRepositoryOperationResult Add(JDir& _dir) = 0;
    
    virtual JRepositoryOperationResult Delete(JFile& _file) = 0;
    virtual JRepositoryOperationResult Delete(JDir& _dir) = 0;
    
    virtual JRepositorySearchResult Search(string _relativeFileName,int _versionID = -1) = 0;
    
    virtual JRepositoryOperationResult Modify(JFile& _file1,JFile& _file2) = 0;
    virtual JRepositoryOperationResult Modify(JDir& _dir1,JDir& _dir2) = 0;
    
    virtual JRepositoryOperationResult CreateAVersion() = 0;
};

#endif	/* IREPOSITORY_H */

